using Beaker.FileSystem;

namespace OpenCube.IO.Overload
{
	/// <summary>
	/// Extension method(s) to add extra functionality to the <see cref="IOverloadingFileSystemFactory"/>
	/// without requiring the implementations to implement all the overloads.
	/// </summary>
	public static class OverloadingFileSystemFactoryExtensions
	{
		/// <summary>
		/// Create a fallback file system based on the list of folders
		/// </summary>
		/// <param name="factory">The factory to use.</param>
		/// <param name="folders">The list of folders to combine into a fallback file system.</param>
		/// <returns>A fallback file sytem that combines the given folders.</returns>
		public static IFileSystem Create(IOverloadingFileSystemFactory factory, params IFolder[] folders)
		{
			return factory.Create(folders);
		}
	}
}